package com.fuxi.cloud.desreport.dao;

import com.fuxi.cloud.desreport.entity.JimuReportDictItem;
import org.jeecgframework.minidao.annotation.Param;
import org.jeecgframework.minidao.annotation.ResultType;
import org.jeecgframework.minidao.annotation.Sql;
import org.jeecgframework.minidao.pojo.MiniDaoPage;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * JimuReportDictItemDao
 *
 * @Author: 扫地僧
 * @CreateTime: 2021-05-03
 */
@Repository
public interface JimuReportDictItemDao {
    @Sql("SELECT * FROM sys_dict_item WHERE ID = :id")
    JimuReportDictItem get(@Param("id") String var1);

    int update(@Param("dictItem") JimuReportDictItem var1);

    void insert(@Param("dictItem") JimuReportDictItem var1);

    @ResultType(JimuReportDictItem.class)
    MiniDaoPage<JimuReportDictItem> getAll(@Param("dictItem") JimuReportDictItem var1, @Param("page") int var2, @Param("rows") int var3);

    @Sql("DELETE from sys_dict_item WHERE ID = :id")
    Integer delete(@Param("id") String var1);

    @Sql("SELECT * FROM sys_dict_item WHERE DICT_ID = :mainId order by sort_order asc, item_value asc")
    List<JimuReportDictItem> selectItemsByMainId(@Param("mainId") String var1);

    @Sql("delete FROM sys_dict_item WHERE ID IN(:asList)")
    void removeByIds(@Param("asList") List<String> var1);

    int count(@Param("dictItem") JimuReportDictItem var1);

    @Sql("delete from sys_dict_item where dict_id = :dictId")
    void deleteByDictId(@Param("dictId") String var1);
}

